﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Model;
using Dal;
namespace Web.service
{
    /// <summary>
    /// RoleService 的摘要说明
    /// </summary>
    public class RoleService : BaseService<RoleModel>
    {

        private RoleDal dal = DalFactory.CreateRoleDal();
        public Object query(HttpContext context)
        {
            return dal.IQuery(null);
        }

        public void add(HttpContext context)
        {
            var model = requestModel(context);
            dal.IAdd(model);
        }
        public void modify(HttpContext context)
        {
            var model = requestModel(context);
            dal.IModify(model);
        }
        public void delById(HttpContext context)
        {
            int id = int.Parse(context.Request["id"]);
            dal.IDelById(id);
        }

    }
}